package com.tcm.user.constants.enums;

import com.base.core.result.ResponseCodeEnum;

/**
 * 错误码枚举类
 *
 * 登录系统，使用 1-001-005-000 段
 */
public enum BusinessCodeEnum implements ResponseCodeEnum {


    //===============登录模块=====================
    IDENTIFIER_PARAMS_NOT_FOUND(1001005001, "缺少账号参数"),
    IDENTITY_TYPE_PARAMS_NOT_FOUND(1001005002, "缺少账号类型参数"),
    IDENTIFIER_NOT_EXISTS(1001005003, "账号不存在"),
    IDENTIFIER_EXISTS(1001005004, "账号已经存在，请直接登录！"),
    USER_ID_NOT_FOUND(1001005006, "账号id不存在"),
    AVATAR_PARAMS_NOT_FOUND(1001005007, "请上传头像"),
    AVATAR_UPDATE_FAIL(1001005008, "头像更换失败"),
    INSERT_FAIL(1001005009, "新增账号失败"),
    FAILED_TO_QUERY_USER(1001005010, "查询用户失败"),
    SMS_IDENTIFIER_NOT_EMPTY(1001005011, "请输入手机号码"),
    SMS_CODE_NOT_FOUND(1001005011, "未检测到验证码"),
    SMS_CODE_HAS_ERROR(1001005012,"验证码错误"),
    SMS_PHONE_NOT_SAME(1001005013, "手机号码不正确"),
    USERNAME_NOT_SUPPORT(1001005014, "不支持用户名登录"),
    WECHAT_CODE_NOT_FOUND(1001005015, "微信授权code码未找到"),
    CLIENT_TYPE_PARAMS_NOT_FOUND(1001005016, "客户端类型未找到"),
    INSERT_SOCIAL_FAIL(1001005017, "保存授权登录信息失败"),
    UPDATE_SOCIAL_FAIL(1001005018, "更新授权登录信息失败"),
    USER_ID_NOT_BIND_SOCIAL_AUTH(1001005019, "账号ID未绑定第三方授权登录"),
    PASSWORD_ERROR(1001005020, "密码不正确"),
    PASSWORD_NOTFOUND(1001005021, "请输入密码"),
    LOGIN_EXPIRED(1001005022, "登录已过期"),
    WECHAT_LOGIN_FAIL(1001005023, "授权登录失败"),
    WECHAT_LOGIN_PARAMS_NOT_FOUND(1001005024, "授权登录参数不存在"),
    SMS_PHONE_ALREADY_EXISTS(1001005025, "手机号码已存在"),
    SMS_PHONE_NOT_EXISTS(1001005026, "手机号码不存在"),
    USER_PARAMS_NOT_FOUND(1001005027, "参数不存在"),
    USER_NOT_FOUND(1001005028, "不存在此用户"),
    ;


    private final int code;
    private final String message;

    BusinessCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
